/*
 * Teknei 2014 - All rights reserved
 */
package com.teknei.acabus.example.ws.impl;


import java.util.List;

import javax.ejb.EJB;
import javax.jws.WebService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.teknei.acabus.FacadeException;
import com.teknei.acabus.core.entities.TableA;
import com.teknei.acabus.example.facade.TableFacade;
import com.teknei.acabus.example.ws.TableAPortType;
import com.teknei.acabus.example.ws.TableARequestType;
import com.teknei.acabus.example.ws.TableAResponseType;

/**
 * WebService endpoint
 * @author Jorge Amaro
 * @version 1.0
 * @since 1.0
 *
 */
@WebService(serviceName = "TableAService", endpointInterface = "com.teknei.acabus.example.ws.TableAPortType", targetNamespace = "http://www.acabus.teknei.com/tableAService/1.0")
public class TableAPortTypeImpl implements TableAPortType {
	
	@EJB
	private TableFacade facade;
	
	private final static Logger LOG = LoggerFactory.getLogger(TableAPortTypeImpl.class);
	/* (non-Javadoc)
	 * @see com.teknei.acabus.example.ws.TableAPortType#addTableA(com.teknei.acabus.example.ws.TableARequestType)
	 */
	public TableAResponseType addTableA(TableARequestType tableARequest) {
		try {
			List<TableA> list = facade.findAllTableA();
		} catch (FacadeException e) {
			LOG.error("Error:::::::::::::::", e);
		}
		TableAResponseType rt = new TableAResponseType();
		rt.setId("1");
		return rt;
	}
}